import { worldRoute } from "./worldRoute";
import { userRoute } from "./userRoute";

export const routeConfig = [
  {
    path: "*",
    name: "/404",
    component: () => import("@/views/404"),
    meta: { title: "404" },
  },
  {
    path: "/login",
    name: "login",
    meta: { title: ["登录"] },
    component: () => import("@/views/user/Login"),
  },
  {
    path: "/",
    name: "/index",
    redirect: "/dashboard",
    meta: { title: ["数据概览"] },
    component: () => import("@/views/Index.vue"),
  },
  {
    path: "/index",
    name: "index",
    component: () => import("@/views/Index.vue"),
    redirect: "/dashboard",
    children: [
      {
        path: "/dashboard",
        name: "dashboard",
        component: () => import("@/views/Dashboard"),
        meta: { title: ["数据概览"] },
      },
      { ...worldRoute },
      { ...userRoute },
      {
        path: "/testVuex",
        name: "testVuex",
        component: () => import("@/views/TestVuex"),
      },
    ],
  },

  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
  // }
];
